/*
* berton
*/
package com.pitop.material.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;

import com.pitop.material.entity.MaterialCategory;

/**
 * 供应类型 api请求熔断器
 * @author berton
 */
@FeignClient(value = "pps-cloud-demo-provider", fallback = MaterialCategoryFeignApiImpl.class)
public interface MaterialCategoryFeignApi {
    /**
     * 查询MaterialCategory一个详情信息
     * @param id 
     * @param code 编码
     * @return BeanRet
     */
    @GetMapping(value = "/materialCategory/load")
    MaterialCategory load(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code);


    /**
     * 根据条件id查询MaterialCategory一个详情信息
     *
     * @param id 
     * @return BeanRet
     */
    @GetMapping(value = "/materialCategory/load/id/{id}")
    MaterialCategory loadById(@RequestParam("id") java.lang.Long id);


    /**
     * 根据条件code查询MaterialCategory一个详情信息
     *
     * @param code 编码
     * @return BeanRet
     */
    @GetMapping(value = "/materialCategory/load/code/{code}")
    MaterialCategory loadByCode(@RequestParam("code") java.lang.String code);

    /**
     * 删除MaterialCategory
     *
     * @return BeanRet
     */
    @DeleteMapping("/materialCategory/delete")
    void delete(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code);


    /**
     * 查询MaterialCategory信息集合
     *
     * @return 分页对象
     */
    @PostMapping(value = "/materialCategory/list")
    List<MaterialCategory> list(@RequestBody MaterialCategory materialCategory,@RequestParam("curPage") int curPage,@RequestParam("pageSize") int pageSize);


    /**
     * 查询MaterialCategory信息集合
     *
     * @return 分页对象
     */
    @GetMapping(value = "/materialCategory/list/by")
    List<MaterialCategory> listByPk(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code,@RequestParam("curPage") int curPage,@RequestParam("pageSize") int pageSize);




    /**
    * 统计MaterialCategory信息数量根据主键
    *
    * @return 总条数
    */
    @GetMapping(value = "/materialCategory/count/by")
    Integer count(@RequestParam("id") java.lang.Long id,@RequestParam("code") java.lang.String code);

    /**
    * 统计MaterialCategory信息数量
    *
    * @return 总条数
    */
    @PostMapping(value = "/materialCategory/count")
    Integer count(@RequestBody MaterialCategory materialCategory);



    /**
     * 创建MaterialCategory
     *
     * @return BeanRet
     */
    @PostMapping("/materialCategory/build")
    MaterialCategory build(@RequestBody MaterialCategory materialCategory);


    /**
     * 修改MaterialCategory
     *
     * @return BeanRet
     */
    @PutMapping("/materialCategory/modify")
    MaterialCategory modify(@RequestBody MaterialCategory materialCategory);



}
